/*
 * @Author: Zhang Kai
 * @Date: 2021-10-18 16:32:22
 * @LastEditors: saber
 * @LastEditTime: 2022-06-29 16:42:42
 * @FilePath: /metricsx-standard-ui/proxy.js
 */
const proxy = {
  '/api/sso': {
    target: process.env.VUE_APP_LOGINSERVER, //'http://ums-dev.digitforce.com/',
    changOrigin: true,
    pathRewrite: {
      '^/api/sso': '/api/sso'
    }
  },
  '/api/ums': {
    target: process.env.VUE_APP_LOGINSERVER, //'http://ums-dev.digitforce.com/',
    changOrigin: true,
    pathRewrite: {
      '^/api/ums': '/api/ums'
    }
  },
  '/api/metadatax': {
    target: process.env.VUE_APP_METADATAX_SERVER,
    changOrigin: true,
    pathRewrite: {
      '^/api/ums': '/api/metadatax'
    }
  },
  '/api/dio': {
    target: 'http://dio-dev.digitforce.com',
    changOrigin: true,
    // pathRewrite: {
    //   '^/api/ums': '/api/dio'
    // }
  },
  [process.env.VUE_APP_SERVERPATH]: {
    target: process.env.VUE_APP_URL, //'http://bigdata.digitforce.com:28636/',
    changOrigin: true, //开启代理
    pathRewrite: {
      [`^${process.env.VUE_APP_SERVERPATH}`]: process.env.VUE_APP_SERVERPATH
    }
    // logLevel: 'debug'
  }
}
module.exports = proxy
// export default proxy;
